import Vue from 'vue'
import Router from 'vue-router'
import Layout from '@/layout'

Vue.use(Router)

export default new Router({
  mode: 'history',
  base: '/bim2/',
  routes: [
    {
      path: '/',
      redirect: '/dashboard'
    },
    {
      path: '/dashboard',
      component: () => import('@/views/dashboard/index'),
      name: 'Dashboard'
    },
    {
      path: '/dashboard2',
      component: () => import('@/views/dashboard2/index'),
      name: 'Dashboard2'
    },
    {
      path: '/notification',
      component: Layout,
      children: [
        {
          path: '/',
          component: () => import('@/views/notification/index'),
          name: 'Notification'
        }
      ]
    },
    {
      path: '/tower',
      component: Layout,
      children: [
        {
          path: '/',
          component: () => import('@/views/tower/index'),
          name: 'Tower'
        }
      ]
    },
    {
      path: '/media',
      component: Layout,
      children: [
        {
          path: '/',
          component: () => import('@/views/media/index'),
          name: 'Media'
        }
      ]
    },
    {
      path: '/door',
      component: Layout,
      children: [
        {
          path: '/',
          component: () => import('@/views/door/index'),
          name: 'Door'
        }
      ]
    },
    {
      path: '/power',
      component: Layout,
      children: [
        {
          path: '/',
          component: () => import('@/views/power/index'),
          name: 'Power'
        }
      ]
    },
    {
      path: '/environment',
      component: Layout,
      children: [
        {
          path: '/',
          component: () => import('@/views/environment/index'),
          name: 'Environment'
        }
      ]
    },
    {
      path: '/personnel',
      component: Layout,
      children: [
        {
          path: '/',
          component: () => import('@/views/personnel/index'),
          name: 'Personnel'
        }
      ]
    }
  ]
})
